﻿Public Class DangNhap

    Private Sub groupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles groupBox1.Enter

    End Sub

    Private Sub DangNhap_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btnDangNhap_Click(sender As System.Object, e As System.EventArgs) Handles btnDangNhap.Click
        Dim login As DangNhapNguoiDung = New DangNhapNguoiDung()
        If DangNhapNguoiDung.DangNhap(txtTenDangNhap.Text, txtMatKhau.Text, txtQuyenHan.Text) = True Then
            MessageBox.Show("Xin Chào Admin", "Đăng Nhập Thành Công", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            Me.Close()
        Else
            MessageBox.Show("Thông Tin Không Đúng.Xin vui Lòng Kiểm Tra Lại", "Lỗi Đăng Nhập", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

    Private Sub btnThoat_Click(sender As System.Object, e As System.EventArgs) Handles btnThoat.Click
        Me.Close()
    End Sub
End Class